package cn.zbacm.api.application.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public abstract class MenuItem {
    private int id;

    private String path;

    private String name;

    @JsonIgnore
    private int displayOrder;

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof MenuItem) {
            return ((MenuItem) obj).getPath().equals(getPath());
        }
        return super.equals(obj);
    }
}
